// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/PlayerController.h"
#include "AuraPlayerController.generated.h"


class UInputMappingContext;
class UInputAction;
class IEnemyInterface;
/**
 * 
 */
UCLASS()
class AURA_API AAuraPlayerController : public APlayerController
{
	GENERATED_BODY()

public:
	AAuraPlayerController();
	/*玩家帧更新*/
	virtual void PlayerTick(float DeltaTime) override;					
	
protected:
	virtual void BeginPlay() override;
	/*输入组件*/
	virtual void SetupInputComponent() override;						
					
private:				
				
	UPROPERTY(EditAnywhere, Category = "Input")							//设置属性：可编辑、"Input"类型
	TObjectPtr<UInputMappingContext> AuraContext;						//输入映射上下文变量
					
	UPROPERTY(EditAnywhere, Category = "Input")				
	TObjectPtr<UInputAction> MoveAction;								//输入动作变量

	void Move(const struct FInputActionValue& InputActionValue);		//回调函数

	/*光标追踪*/
	void CursorTrace();

	TObjectPtr<IEnemyInterface> LastActor;
	TObjectPtr<IEnemyInterface> ThisActor;
};


